/* 
 * File:   main.cpp
 * Author: alex
 *
 * Created on March 21, 2014, 6:06 PM
 */

#include <cstdlib>
#include "logger.h"
#include <cstdio>
#include <iostream>

using namespace std;

/*
 * 
 */
int main(int argc, char** argv) {

    Logger::init();
    fork();
    fork();
    fork();
    fork();

        char * name;
        sprintf(name, "%d", getpid());
        Log log = Logger::subs(DEBUG_MODE, name);
        
        for (int i = 0; i < 1000; i++) {
            log.Debug("olerwdjdnf jnrgneiur gneiurng iuerug neirngiuenrg iuenri hgneijrn gijenrg oregibneiru gneurn gijernb uenrg ijenrg");
            log.Warning("of jnrgneiur gneiurng iuerug neirngiuenrg iuenri hgneijrn gijenrg oregibneiru gneurn gije");
            log.Error("oloerwdjdnf jnrgneiur gneiurng iuerug neirngiuenrg iuenri hgneijrn gijenrg oregibneiru gneurn gijernb uenrg ir");
        }
        log.logout();
   



    //usleep(1000);
    exit(0);
}

